package com.bfl.sa.sys.user.mapper;

import com.bfl.sa.common.mapper.BaseMapper;
import com.bfl.sa.common.mybatis.entity.Query;
import com.bfl.sa.sys.user.entity.User;
import com.bfl.sa.sys.user.entity.UserOrganizationJob;

import java.util.List;

public interface UserMapper extends BaseMapper<User, Long> {

    User findByUsername(String username);

    User findByEmail(String email);

    User findByMobilePhoneNumber(String mobilePhoneNumber);

    UserOrganizationJob findUserOrganization(User user, Long organizationId, Long jobId);

    List<UserOrganizationJob> findUserOrganizationJobOnNotExistsOrganizationOrJob(Query query);

    void deleteUserOrganizationJobOnNotExistsUser();
}
